﻿using System;
using System.Web;
using Cubicle.Core.Shared;
using Cubicle.Service.Hosting;

namespace Cubicle.Service
{
    public class Global : HttpApplication
    {
        //<%@ ServiceHost 
        //    Language="C#" 
        //    Debug="true" 
        //    Service="Cubicle.Engine, Cubicle.ServerSide" 
        //%>
        protected void Application_Start(object sender, EventArgs e)
        {
            var container = ContainerServices.CreateContainer();
            ComposedServiceHosts.SetCompositionContainer(container);
        }

        protected void Session_Start(object sender, EventArgs e) { }
        protected void Application_BeginRequest(object sender, EventArgs e) { }
        protected void Application_AuthenticateRequest(object sender, EventArgs e) { }
        protected void Application_Error(object sender, EventArgs e) { }
        protected void Session_End(object sender, EventArgs e) { }
        protected void Application_End(object sender, EventArgs e) { }
    }
}